Learn R Programming

mvcor (version 1.1)

Distance correlation: Distance correlation

Description

Distance correlation.

Usage

dcor(y, x, bc = FALSE)

Value

A list including:

dcov

The (bias corrected) distance covariance.

dvarX

The (bias corrected) distance variance of x.

dvarY

The (bias corrected) distance variance of Y.

dcor

The (bias corrected) distance correlation.

Arguments

y

A numerical matrix.

x

A numerical matrix.

bc

Do you want the corrected distance correlation? Default value if FALSE.

Author

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>.

Details

The distance correlation or the bias corrected distance correlation of two matrices is calculated. The latter one is used for the hypothesis test that the distance correlation is zero.).

References

G.J. Szekely, M.L. Rizzo and N. K. Bakirov (2007). Measuring and Testing Independence by Correlation of Distances. Annals of Statistics, 35(6): 2769--2794.

Szekely G. J. and Rizzo M. L. (2023). The energy of data and distance correlation. Chapman and Hall/CRC.

See Also

sq.correl, rv

Examples

Run this code
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]), bc = TRUE )

Run the code above in your browser using DataLab